package com.parcel;

/**
 * 内部类使用.this 与 .new
 * Created by zhuangqi on 2016/12/12.
 */
public class Dothis {
    void f() { System.out.println("Dothis.f()"); }
    public class Inner {
        public Dothis outer() {
            return Dothis.this;
        }
    }
    public Inner inner() {
        return new Inner();
    }

    public static void main(String[] args) {
        Dothis dt = new Dothis();
        Dothis.Inner dti = dt.inner();
        dti.outer().f();
        dt.f();
    }
}
